import request from "@/utils/request";

/**
 * 规程任务api接口集合
 * @method getList 列表
 * @method postAdd 新增
 * @method putEdit 修改
 * @method deleteDel 删除
 * @method getHrStatistics 查询人力资源
 */

export function getList(params) {
    return request({
        url: "/mes/specificationTaskController/list",
        method: "get",
        params
    });
}
export function postAdd(data) {
    return request({
        url: "/mes/specificationTaskController/add",
        method: "post",
        data: data
    });
}
export function putEdit(data) {
    return request({
        url: "/mes/specificationTaskController/edit",
        method: "put",
        data: data
    });
}
export function deleteDel(ids) {
    return request({
        url: "/mes/specificationTaskController/" + ids,
        method: "delete"
    });
}
export function getObject(id,loading){
    return request({
        url: "/mes/specificationTaskController/" + id,
        method:'get',
        autoUntie: false,
        loading
    });
}

export function getHrStatisticsTotal(params) {
    return request({
        url: "/mes/mesStatisticsController/listHrTotal",
        method: "get",
        params
    });
}

export function getHrStatistics(data) {
    return request({
        url: "/mes/mesStatisticsController/listHrRecord",
        method: "post",
        data
    });
}

export function getWorkRequestByOrderId(id) {
    return request({
        url: "/mes/mesWorkOrderController/getWorkRequestByOrderId",
        method: "get",
        params:{
            id:id
        }
    });
}

